<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>属性选择器</title>
    <script src="js/jquery-1.12.4.js"></script>
   
</head>
<body>
    <h2>热门游戏</h2>
    <ul>
        <li>王者荣耀</li>
        <li>开心消消乐</li>
        <li class="three">我的世界</li>
        <li>荒野行动</li>
        <li>梦幻西游</li>
        <li>节奏大师</li>
        <li>贪吃蛇大作战</li>
    </ul>
         <script type="text/javascript">
        $(document).ready(function() {
             $("h2").click(function(){ 
                // $("li:first").css("background","#ccc")
				// $("li:not(.three)").css("background","#ccc") )")
                // $("li:even").css("background","#ccc")
                // $("li:lt(1)").css("background","#ccc")
                $(":header").css("background-color","#ccc")
             })
        });
     </script>
</body>
</html>